package com.ruoyi.web.controller.wechat.response;

import lombok.Data;
import java.util.List;

/**
 * Gemini API 响应
 *
 * @author chenchuan2
 * @date 2025-09-18
 */
@Data
public class GeminiApiResponse {
    
    private List<Candidate> candidates;
    private UsageMetadata usageMetadata;
    private String modelVersion;
    private String responseId;
    
    @Data
    public static class Candidate {
        private Content content;
        private String finishReason;
        private Integer index;
    }
    
    @Data
    public static class Content {
        private List<Part> parts;
        private String role;
    }
    
    @Data
    public static class Part {
        private InlineData inlineData;
        private String text;
    }
    
    @Data
    public static class InlineData {
        private String mimeType;
        private String data;
    }
    
    @Data
    public static class UsageMetadata {
        private Integer promptTokenCount;
        private Integer candidatesTokenCount;
        private Integer totalTokenCount;
        private List<TokenDetail> promptTokensDetails;
        private List<TokenDetail> candidatesTokensDetails;
    }
    
    @Data
    public static class TokenDetail {
        private String modality;
        private Integer tokenCount;
    }
}
